libxl: Do not trust frontend for vtpm list
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 3 May 2016 14:58:32 +0000 (15:58 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 2 Jun 2016 14:53:28 +0000 (15:53 +0100)
commit0527125a6aae58a7eee8078184fced49dc2422ef
tree66a4a55a391bff3932d6623e4c1ea5278ca45179
parentc429d90b6d6fb4885fa358b35b2338a697ce7973
libxl: Do not trust frontend for vtpm list

libxl_device_vtpm_list needs to enumerate and identify devices without
trusting frontend-controlled data.  So

* Use the /libxl path to enumerate vtpms.
* Use the /libxl path to find the corresponding backends.
* Parse the backend path to find the backend domid.

This is part of XSA-175.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c